<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE6">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<link rel="stylesheet" type="text/css" href="<%=basePath%>css/all_b.css?20161126">
		<title>${user.userNo} - 会员扣款</title>
		<link rel="shortcut icon" href="<%=basePath%>favicon.ico">
		<script type="text/javascript" src="<%=basePath%>js/jquery.min.js?20161126"></script>
		<script type="text/javascript" src="<%=basePath%>js/layer/layer.js?20161126"></script>
	</head>
	<body style="" id="bodyModule">
		<jsp:include page="../commons/manage_head.jsp" flush="true"></jsp:include>
		<div style="height: 456px;" id="layout" class="container">
			<div style="display: none;" dom="left" class="sidebar">
				<div id="account_nav">
					<div class="box account_nav">
						<h3 class="blue-title">
							<span>账号管理</span><em>数量</em>
						</h3>
						<ul id="nav" class="left_nav">
							<li class="" level="0">
								管理员
								<em id="accounts0">2</em>
							</li>
							<li class="on" level="1">
								分公司
								<em id="accounts1">4</em>
							</li>
							<li level="2">
								股东
								<em id="accounts2">4</em>
							</li>
							<li level="3">
								总代理
								<em id="accounts3">4</em>
							</li>
							<li level="4">
								代理
								<em id="accounts4">4</em>
							</li>
							<li level="5">
								会员
								<em id="accounts5">7</em>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div style="display: block;" id="rightLoader" dom="right"
				class="main-content bet-content">
				<div id="dagudong" class=" member">
					<div class="title">
						<span id="account_name">会员充值</span>
						<a href="javascript:history.go(-1)" id="reback" level="1"
							class="mag-btn1">返回</a>
					</div>
					<div id="user_info">
						<form class="ant-form-horizontal"
							action="<%=basePath%>manage/user_kk" method="post">
							<input type="hidden" id="userId" name="userId" value="${user.userId}"/>
							<table class="clear-table base-info">
								<caption>
									<div>
										基本资料
									</div>
								</caption>
								<tbody>
									<tr>
										<th>
											账号
										</th>
										<td>
											${user.userNo}
										</td>
										<th>
											余额
										</th>
										<td>
											${user.userBalance}
										</td>
										<th>
											名称
										</th>
										<td>
											${user.userName}
										</td>
									</tr>
									<tr>
										<th>
											扣款金额
										</th>
										<td>
											<input name="userBalance" type="text"
												onkeyup="this.value=this.value.replace(/\D/g,'')"
												onafterpaste="this.value=this.value.replace(/\D/g,'')" />
											<span class="g-vd-status"></span>
										</td>
										<th>
										</th>
										<td>
										</td>
										<td>
										</td>
										<td>
										</td>
									</tr>
								</tbody>
							</table>
						</form>
					</div>
					<div class="btn-line">
						<a type="button" class="yellow-btn" id="submit" onclick="userCz();"
							href="javascript:void(0)">确认扣款</a>
					</div>
				</div>
			</div>
		</div>
		<!--[if lte IE 6.5]><![endif]-->
		<div class="g-dialog-win elem-dialog normalsize"
			style="z-index: 999999999; position: absolute; right: 3px; top: 40px; display: none;"
			id="lineSelectBox">
		</div>
		<div class="footer">
			<div class="marquee">
				<a id="moreNotice" class="more more_announcement"
					href="javascript:void(0)">更多</a>
				<p class="marqueeBox">
					<marquee id="marqueeBox" scrollamount="2">
						欢迎光临...........
					</marquee>
				</p>
			</div>
			<span id="marqueeRefresh" class="hidden">3</span>
			<span id="kefuRefresh" class="hidden"></span>
		</div>
		<script src="<%=basePath%>js/jquery.min.js?20161104"></script>
	</body>
	<script>
	$(function(){
		 $(document).bind("contextmenu",function(e){   
	         return false;   
	   	});
	});
	function userCz(){
			var userId = $("#userId").val(); 
			if($.trim(userId) == ''){
				layer.msg("用户id没有获取到");
				return;
			}
			$.ajax({
	            type: "POST",
	            url:$("form").attr("action"),
	            data:$("form").serialize(),
	            error: function(request) {
	                layer.msg("连接错误");
	            },
	            success: function(data) {
	            	if(data.resultCode == '0'){
	            		layer.msg("扣款成功");
	            		window.location.reload();
	            	}else{
	            		layer.msg(data.msg);
	            	}
	            }
	        });
	}
	</script>
</html>